import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import './style.css'
import App from './App.vue'
import router from './router'
import './until/http'
import http from './until/http'
import './assets/font/iconfont.css'
import { createDiscreteApi } from 'naive-ui'

const app = createApp(App)
const pinia = createPinia()
const { message } = createDiscreteApi(['message'])
const { dialog } = createDiscreteApi(['dialog'])

app.config.globalProperties.$http = http
app.config.globalProperties.$message = message
app.config.globalProperties.$dialog = dialog

app.use(pinia)
app.use(router)
app.use(ElementPlus)

app.mount('#app')
